$(function () {
    var meetSel = $.Params.create();
    meetSel.ajax("get", getMeetIP() + "meet", function (data) {
        html = "<option value='0'>请选择会议</option>";
        if(data.count > 0){
            $.each(data.rows,function(i,val){
                html+="<option value = '"+val.id+"'>"+val.meetTitle+"</option>";
            })
        }
       $("#meetTitle").html(html);
    })

    $("#addData").on("click", function () {
        var meetId = $("#meetTitle").val();
        var buildTitle = $("#buildTitle").val();
        var code = $("#code").val();
        var addSel = $.Params.create();
        addSel.addParams("meetId", meetId);
        addSel.addParams("buildTitle", buildTitle);
        addSel.addParams("code", code);
        addSel.ajax("post", getMeetIP() + "build", function (data) {
               window.location.href = "buildList.html";
        })
    })

    $("#cancelAdd").on("click", function () {
        history.go(-1);
    })
})